import {BasicColumn} from '/@/components/Table';

//列表数据
export const columns: BasicColumn[] = [

  {
    title: '手机号',
    align: "center",
    dataIndex: 'mphone'
  },
  {
    title: '名称',
    align: "center",
    dataIndex: 'mrealname'
  },
  {
    title: '总价',
    align: "center",
    dataIndex: 'mamount',
    customRender:({text}) =>{
      return !text ? "0.0000" : parseFloat(text).toFixed(4);
    },
  },
];

//明细列表数据
export const itemColumns: BasicColumn[] = [
  {
    title: '类型',
    align: "center",
    dataIndex: 'preType',
    slots: { customRender: 'preTypeSlot' }
  },
  {
    title: '条数',
    align: "center",
    dataIndex: 'preNum'
  },
  {
    title: '单价',
    align: "center",
    dataIndex: 'prePrice',
    customRender:({text}) =>{
      return !text ? "0.0000" : parseFloat(text).toFixed(4);
    },
  },
  {
    title: '总价',
    align: "center",
    dataIndex: 'preAmount',
    customRender:({text}) =>{
      return !text ? "0.0000" : parseFloat(text).toFixed(4);
    },
  },
  {
    title: '备注',
    align: "center",
    dataIndex: 'preRemarks',
    customRender:({text}) =>{
      return !text ? "-" : text;
    },
  },
  {
    title: '状态',
    align: "center",
    dataIndex: 'preStatus',
    slots: { customRender: 'preStatusSlot' }
  },
  {
    title: '创建时间',
    align: "center",
    dataIndex: 'createTime'
  },
];
